﻿
<%@ Page Title="" Language="C#" MasterPageFile="~/Presentation/master.Master" AutoEventWireup="true" CodeBehind="DeliveryOrder.aspx.cs" Inherits="StationeryInv.DeliveryOrder" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <%--<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DeliveryOrder.aspx.cs" Inherits="StationeryInv.DeliveryOrder" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            text-decoration: underline;
        }
        .style2
        {
            text-align: left;
        }
        .style3
        {
            text-align: center;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">--%>
    <div class = "row" align ="center"> 
    
        <h2 class="style3">
            <strong>LOGIC University<br />
            Delivery Order Form</strong></h2>
        <p class="style2">
            &nbsp;</p>
        
    </div>


    <div class = "row">
   
        <asp:Label ID="lblDeliveryOrderNo" runat="server" CssClass="col-sm-3 text-info" Text="Delivery Order Number"></asp:Label>
        <asp:Label ID="lblDONumber" runat="server" CssClass="col-sm-9 text-info" Text="Auto Generated Delivery Order No"></asp:Label>

        </div>

        <br />

            <div class = "row">
        <asp:Label ID="lblPONumber" runat="server" CssClass="col-sm-3 text-info" 
                    Text="Enter PO Number"></asp:Label>
       
                <asp:TextBox ID="tbPONumber" runat="server" CssClass="form-control text-left">Enter PO Number</asp:TextBox>
&nbsp;
</div>

<br />
 <div class = "row">

        <asp:Button ID="btnGetPO" runat="server" Text="Get Purchase Order Details" CssClass="btn btn-default"
            onclick="btnGetPO_Click" />
            </div>


            <br />
            <br />
            <br />
            
            <div class = "row">
        <asp:Label ID="lblSupplierBillNo" runat="server" CssClass="col-sm-4 text-info"
        Text="Supplier Bill Number"></asp:Label>

        <asp:TextBox ID="tbSupplierBillNo" runat="server" CssClass="col-sm-8 text-info" Width="250px">Enter Own Supplier Ref Number</asp:TextBox>
    </div>
   
    <br />
     
     <div class = "row">
      <asp:Label ID="lblSupplierName" runat="server" Text="Supplier Name" CssClass="col-sm-4 text-info"></asp:Label>
        <asp:Label ID="tbsupplierName" runat="server" 
        Text="Supplier Name from Database" CssClass="col-sm-8 text-info"></asp:Label>
        </div>

        <br />

    <div class = "row">
      <asp:Label ID="lblDateofDelivery" runat="server" Text="Date of Delivery" CssClass="col-sm-4 text-info"></asp:Label>
        <asp:TextBox ID="tbDeliveryDate" runat="server" CssClass="col-sm-8 text-info" Width="185px">Date the Goods arrived</asp:TextBox>
 
 </div>

        <br />
        <br />
 

 

   <div class = "row">
    <asp:GridView ID="GviewDO" runat="server"  CssClass="col-sm-12 table table-striped table-bordered table-hover" AutoGenerateColumns ="False" >
            <Columns>
                <asp:BoundField DataField="ItemID" HeaderText="Item ID" />
                <asp:BoundField DataField="Description" HeaderText="Description" />
                  <asp:BoundField DataField="Qty" HeaderText="Quantity" />
                
                <asp:TemplateField HeaderText="Remarks">
                    <ItemTemplate>
                        <asp:TextBox ID="Remarks"  runat="server"></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
                
            </Columns>
        </asp:GridView> 
        </div>
            


    <div class = "row">
        <asp:RegularExpressionValidator ID="valregDateofDelivery" runat="server" CssClass="col-sm-12 text-info"
            ControlToValidate="tbDeliveryDate" ErrorMessage="Enter A Valid Date of DD/MM/YYYY for Date of Delivery" 
            ForeColor="Red" 
            
            
        ValidationExpression="(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d"></asp:RegularExpressionValidator>
    </div>
    <br />

    <div class = "row">
    <asp:RequiredFieldValidator ID="valReqPONumber" runat="server" CssClass="col-sm-12 text-info"
        ControlToValidate="tbPONumber" ErrorMessage="The Purchase Order No is required" 
        ForeColor="Red"></asp:RequiredFieldValidator>
  </div>
  <br />

  <div class = "row">
    <asp:RegularExpressionValidator ID="valregPONumber" runat="server" CssClass="col-sm-12 text-info" 
        ControlToValidate="tbPONumber" 
        ErrorMessage="Enter Only Positive Integers for PO Number" ForeColor="Red" 
        ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>
  </div>
  <br />

<div class = "row">
    <asp:RegularExpressionValidator ID="valregSupplierBillNo" runat="server" CssClass="col-sm-12 text-info" 
        ControlToValidate="tbSupplierBillNo" 
        ErrorMessage="Enter Only Positive Integers for Supplier Ref Number" 
        ForeColor="Red" ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>
    </div>
   
   <br />

    <div class = "row">
    <asp:Label ID="lblSignedBy" runat="server" Text="Signed By" CssClass="col-sm-5 text-info" ></asp:Label>
    <asp:DropDownList ID="ddlSignedBy" runat="server" CssClass="col-sm-7 text-info" 
        DataSourceID="SqlDataSourceStoreEmployeeName" DataTextField="Name" 
        DataValueField="Name">
    </asp:DropDownList>
    </div>

    <br />

    <asp:SqlDataSource ID="SqlDataSourceStoreEmployeeName" runat="server" 
        ConnectionString="<%$ ConnectionStrings:InvManagementConnectionString %>" 
        
        SelectCommand="SELECT DISTINCT [Name] FROM [Employee] WHERE (([DeptID] = @DeptID) AND ([Role] = @Role))">
        <SelectParameters>
            <asp:Parameter DefaultValue="310002" Name="DeptID" Type="Int32" />
            <asp:Parameter DefaultValue="Employee" Name="Role" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <br />

    <div align ="center">
    <asp:Button ID="btnGenerateDO" runat="server" Text="Generate Delivery Order"  CssClass="btn btn-primary" 
        onclick="btnGenerateDO_Click" />
        </div>

</asp:Content>

<%--
    </form>
</body>
</html>
--%>